<template>
	<view>
		<!-- 公共导航栏 -->
		<CustomNavBar title="惠商城" @search-click="handleSearchClick"
			style="position: fixed; width: 100%; z-index: 100;" />
		<view class="by_car_top">
			<view class="check_all">
				<label>
					<checkbox class="check_all_box">
						<text>全选</text>
					</checkbox>
				</label>
				<button class="del_all" plain="true">删除</button>
			</view>
		</view>
		<view class="blank_top">
		</view>
		<view class="check_body">
			<view class="check_it">
				<text class="check_price">￥xxx</text>
				<checkbox class="check_items">
					<image src="../../static/images/1.jpg" mode=""></image>
					<text class="check_text">选项选项选项选项选项选项选项选项选项选项选项选项选项选项选项选项选项选项选项选项选项选项选项选项选项1</text>
				</checkbox>
				<button class="del_item" plain="true">删除</button>
			</view>
		</view>
		<view class="blank_foot"></view>
		<view class="check_foot">
			<text>总计</text>
			<button plain="true"> 结算</button>
		</view>
	</view>
</template>

<script>
	import CustomNavBar from '@/components/common/CustomNavBar.vue'
	export default {

		data() {
			return {

			}
		},
		methods: {
			handleSearchClick() {
				// 跳转到搜索页面
				uni.redirectTo({
					url: '/pages/search/search'
				});
			}
		},
		components: {
			CustomNavBar
		}
	}
</script>

<style scoped>
	.check_all {
		position: fixed;
		display: flex;
		z-index: 100;
		background-color: white;
		top: 160rpx;
		width: 100%;
		height: 60rpx;
		line-height: 60rpx;
		border-bottom: 1rpx solid #d5d5d5;
	}

	.check_body {
		height: 940rpx;
		overflow: visible;
	}

	.blank_top {
		height: 220rpx;
	}

	.blank_foot {
		height: 90rpx;
		/* background-color: #bcbcbc; */
	}

	.del_all {
		line-height: 60rpx;
		position: absolute;
		right: 0;
		background-color: transparent;
		border: 0;
	}

	.check_it {
		position: relative;
		border: 1rpx solid #bcbcbc;
	}

	.check_items {
		margin-left: 20rpx;
		position: relative;
		display: flex;
	}

	.check_items image {
		display: inline-block;
		width: 200rpx;
		height: 200rpx;
		margin: 20rpx;
	}

	.check_text {
		display: inline-block;
		max-width: 400rpx;
		overflow: hidden;
		text-overflow: ellipsis;
		display: -webkit-box;
		-webkit-line-clamp: 2;
		-webkit-box-orient: vertical;
	}

	.del_item {
		position: absolute;
		right: 0;
		bottom: 0;
		background-color: transparent;
		border: 0;
		color: #adadad;
	}

	.del_item:active {
		color: #ff0000;
	}

	.check_price {
		position: absolute;
		right: 0;
		top: 0;
		font-size: 40rpx;
		color: #ff5218;
		margin-right: 40rpx;
	}

	.check_foot {
		display: flex;
		position: fixed;
		width: 100%;
		bottom: 0rpx;
		height: 80px;
		line-height: 80px;
		background-color: #ffffff;
		border-top: 1px solid #e2e2e2;
	}

	/* 针对微信小程序或其他特定设备 */
	@media (max-width: 768px) {
		.check_foot {
			bottom: 0rpx;
			height: 80rpx;
			line-height: 80rpx;
			border-top: 1rpx solid #e2e2e2;
		}
	}

	.check_foot text {
		margin-left: 100rpx;
		color: #ff5218;
		font-size: 40rpx;
		flex-grow: 1;
	}

	.check_foot button {
		background-color: transparent;
		border: 0;
		margin-right: 100rpx;
	}
</style>